#author wendyeq@gmail.com

from google.appengine.ext import db
# Create your models here.

class Photo(db.Model):  
    create_time = db.DateTimeProperty(auto_now_add=True)
    update_time = db.DateTimeProperty()
    width = db.IntegerProperty()
    height = db.IntegerProperty()
    hsv_histogram = db.ListProperty(float)
    similars = db.StringListProperty()
    similar_times = db.IntegerProperty(default=0)

class PhotoURL(db.Model):
    link = db.LinkProperty()
    isReaded = db.BooleanProperty(default=False)
    create_time = db.DateTimeProperty(auto_now_add=True)
    update_time = db.DateTimeProperty()
    fail_count = db.IntegerProperty(default=0)

class Count(db.Model):
    create_time = db.DateTimeProperty(auto_now_add=True)
    update_time = db.DateTimeProperty()
    counts = db.IntegerProperty(default=0)

class FlickrInfo(db.Model):
    secret = db.StringProperty()
    photo_id = db.IntegerProperty(default=4000000000)
    fail_id = db.IntegerProperty(default=0)
    create_time = db.DateTimeProperty(auto_now_add=True)
    update_time = db.DateTimeProperty()
    
    
